package com.app.view.component.tools 
{
    import flash.display.Sprite;
    import flash.text.TextField;
    import gs.TweenLite;
    /**
     * ...
     * @author kevin
     */
    public class Tips extends Sprite
    {
        private var info_txt:TextField;
		
        public function Tips():void 
		{
            init();
        }
		
		private function init():void
		{
			info_txt = new TextField;
            info_txt.background = true;
            info_txt.backgroundColor = 0xffcc32;
            info_txt.border = true;
            info_txt.autoSize = "left";
            info_txt.blendMode = "layer";
            info_txt.alpha = 0;
            addChild(info_txt);
            mouseChildren = mouseEnabled = false;
		}
		
        public function moveTo(_x:uint, _y:uint):void 
		{
            alpha = 0;
            TweenLite.to(this, .3, { x:_x, y:_y, autoAlpha:1 } );
        }
        public function hide():void 
		{
            TweenLite.to (this, .3, { autoAlpha:0 } );
        }
        public function set info(_str:String ):void {
            info_txt.text = _str;
            info_txt.alpha = info_txt.text.length >0?1:0;
        }
    }
}